import router from './router'
import storage from './utils/storage'
const whiteList = ['/login', '/register', '/login_code']
router.beforeEach((to, from, next) => {
  if (whiteList.includes(to.path)) return next()
  if (!storage.getData('userInfo')) return next('/login_code')
  next()
})
